"""weblog URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.views import static
from django.conf import settings
from django.conf.urls import url
from django.contrib import admin
from django.urls import path
from web import views

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', views.home),
    path('index/', views.home),
    path('pending/', views.pending, name='pending'),
    path('list/', views.getList),
    path('changeip/', views.changeip),
    path('mysql/', views.mysqlinsertTest),
    url(r'^static/(?P<path>.*)$', static.serve,
        {'document_root': settings.STATIC_ROOT}, name='static'),
    url(r'^ajax/$', views.ajaxtest, name='ajaxtest'),
    url(r'^init/$', views.pageinit, name='init'),
    url(r'^addgood/$', views.addgood, name='addgood'),
    url(r'^page/$', views.getpage, name='getpage'),
    url(r'^getcomment/$', views.getcomment, name='getcomment'),
    url(r'^login/$', views.login, name='login'),
    url(r'^comment/$', views.addcomment, name='comment'),
    url(r'^regist/$', views.regist, name='regist'),
    url(r'^alert/$', views.alert, name='alert'),
    url(r'^publish/$', views.publish, name='publish'),
    url(r'^upload/$', views.upload, name='upload'),
    url(r'^clearcache/$', views.clearcache, name='clearcache'),
]
